package Day9;

import java.util.*;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String a = in.nextLine();
            int count = 3;
            StringBuffer ret = new StringBuffer();
            Queue<Character> queue = new LinkedList<>();
            for(int i = 0; i < a.length();i++){
                queue.add(a.charAt(i));
            }
            while (!queue.isEmpty()){
                ret.append(queue.poll());
                count--;
                if(count == 0){
                    ret.append(",");
                    count = 3;
                }
            }
            System.out.print(ret);
        }
    }
}
